import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export default new Router({
  // mode:'history',
  // base:'wjlflk',
  routes: [{
    path: '/',
    redirect: '/login'
  },
    {
      path: '*',
      component: require('@/views/NoPage.vue').default
    },
    // 组件示例
    {
      path: '/demo',
      component: require('@/views/demo/demo.vue').default
    },
    // 登录
    {
      path: '/login',
      component: require('@/views/login/Login.vue').default
    },
    {
      path: '/KgappGraph',
      component: require('@/views/atlas-intelligent-retrieval/KgappGraph.vue').default
    },
    {
      path: '/new',
      component: require('@/views/new/new.vue').default
    },
    // 注册
    {
      path: '/register',
      component: require('@/views/register/Register.vue').default
    },
    //  自定义除header外的内容，可以左侧菜单，右侧内容【参考/pages/demo/sub】；或者左侧树右侧内容，或者全是自定义内容【/pages/index】，可以参考 /pages 内的页面代码
    {
      path: '/pages',
      component: require('@/layout/main-page/PageNoSidebar.vue').default,
      children: [
        {
          path: '/',
          redirect: '/pages/systemmanage'
        },
        // 自定义除header外的内容，content内容为空
        {
          path: '/pages/index',
          component: require('@/views/pages/index/Index.vue').default,
        },
        // 自定义除header外的内容，content内容为自定义，NoSidebarDemo.vue只是示例，自定义为左侧菜单，右侧主内容。
        {
          path: '/pages/demo',
          component: require('@/views/pages/page-no-sidebar-demo/NoSidebarDemo.vue').default,
          children: [
            {
              path: '/',
              redirect: '/pages/demo/sub'
            },
            //右侧主内容
            {
              path: '/pages/demo/sub',
              component: require('@/views/pages/page-no-sidebar-demo/SubPage.vue').default,
            }
          ]
        },
        //系统管理
        {
          path: '/pages/systemmanage',
          component: require('@/views/pages/system-manage/SystemManageIndex.vue').default,
          children: [
            {
              path: '/',
              redirect: '/pages/systemmanage/usermanage'
            },
            {
              path: '/pages/systemmanage/usermanage', //用户管理
              component: require('@/views/pages/system-manage/UserManage.vue').default,
            },
            {
              path: '/pages/systemmanage/rolemanage', //角色管理
              component: require('@/views/pages/system-manage/RoleManage.vue').default,
            },
            {
              path: '/pages/systemmanage/menumanage', //菜单管理
              component: require('@/views/pages/system-manage/MenuManage.vue').default,
            },
            {
              path: '/pages/systemmanage/organizationmanage', //组织机构管理
              component: require('@/views/pages/system-manage/OrganizationManage.vue').default,
            },
            {
              path: '/pages/systemmanage/paramset', //参数设置
              component: require('@/views/pages/system-manage/ParamSet.vue').default,
            },
            {
              path: '/pages/systemmanage/dictionarymanage', //字典管理
              component: require('@/views/pages/system-manage/DictionaryManage.vue').default,
            },
            {
              path: '/pages/systemmanage/dictionarydata', //字典数据
              component: require('@/views/pages/system-manage/DictionaryData.vue').default,
            },
            {
              path: '/pages/systemmanage/systemMonitor', // 系统监控
              component: require('@/views/pages/system-monitor/SystemMonitorIndex.vue').default,
              children: [
                {
                  path: '/',
                  redirect: '/pages/systemmanage/systemMonitor/physicalsource',
                },
                {
                  path: '/pages/systemmanage/systemMonitor/physicalsource', //物理资源监控
                  component: require('@/views/pages/system-manage/PhysicalSource.vue').default,
                },
                {
                  path: '/pages/systemmanage/systemMonitor/jvmmonitor', //jvm监控
                  component: require('@/views/pages/system-manage/JvmMonitor.vue').default,
                },
                {
                  path: "/pages/systemmanage/systemMonitor/portDocument", // 接口文档
                  component: require('@/views/pages/system-monitor/PortDocument.vue').default,
                },
                {
                  path: "/pages/systemmanage/systemMonitor/dataMonitoring", // 数据监控
                  component: require('@/views/pages/system-monitor/DataMonitoring.vue').default,
                },
                {
                  path: "/pages/systemmanage/systemMonitor/systemLog", // 系统日志
                  component: require('@/views/pages/system-monitor/SystemLog.vue').default,
                },
                {
                  path: "/pages/systemmanage/systemMonitor/logManagement", // 日志管理
                  component: require('@/views/pages/system-monitor/LogManagement.vue').default,
                },
                {
                  path: "/pages/systemmanage/systemMonitor/WSController", // 日志管理
                  component: require('@/views/pages/system-monitor/WSController.vue').default,
                }
              ]
            }
          ]
        },
        //系统管理网关
        {
          path: '/pages/systemmanagegateway',
          component: require('@/views/pages/system-manage-gateway/SystemManageIndex.vue').default,
          children: [
            {
              path: '/',
              redirect: '/pages/systemmanagegateway/usermanagegateway'
            },
            {
              path: '/pages/systemmanagegateway/usermanagegateway', //用户管理
              component: require('@/views/pages/system-manage-gateway/UserManage.vue').default,
            },
            {
              path: '/pages/systemmanagegateway/serviceconfiggateway', //服务配置
              component: require('@/views/pages/system-manage-gateway/ServiceConfig.vue').default,
            },
            {
              path: '/pages/systemmanagegateway/rolemanagegateway', //角色、权限管理
              component: require('@/views/pages/system-manage-gateway/RoleManage.vue').default,
            },
            {
              path: '/pages/systemmanagegateway/menumanagegateway', //菜单管理
              component: require('@/views/pages/system-manage-gateway/MenuManage.vue').default,
            }
          ]
        },
      ]
    },
    //  这种日常使用较多。左侧显示内容只有菜单，每个页面左侧菜单只是文字和图标不同，右侧为主页面区域，这种情况可以参考 /page 内的页面代码。
    {
      path: '/page',
      component: require('@/layout/main-page/PageWithSidebar.vue').default,
      children: [
        {
          path: '/',
          redirect: '/page/demo'
        },
        {
          path: '/page/demo',
          component: require('@/views/pages/page-with-sidebar-demo/PageWithSidebarDemo.vue').default,
        }
      ]
    }
  ]
})
